/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package AccesoDatos.Persistencia.Entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author sebaxtian
 */
@Embeddable
public class EAsignadoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ISBN")
    private long isbn;
    @Basic(optional = false)
    @Column(name = "CODIGOAREA")
    private int codigoarea;

    public EAsignadoPK() {
    }

    public EAsignadoPK(long isbn, int codigoarea) {
        this.isbn = isbn;
        this.codigoarea = codigoarea;
    }

    public long getIsbn() {
        return isbn;
    }

    public void setIsbn(long isbn) {
        this.isbn = isbn;
    }

    public int getCodigoarea() {
        return codigoarea;
    }

    public void setCodigoarea(int codigoarea) {
        this.codigoarea = codigoarea;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) isbn;
        hash += (int) codigoarea;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EAsignadoPK)) {
            return false;
        }
        EAsignadoPK other = (EAsignadoPK) object;
        if (this.isbn != other.isbn) {
            return false;
        }
        if (this.codigoarea != other.codigoarea) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "AccesoDatos.Persistencia.Entidad.EAsignadoPK[isbn=" + isbn + ", codigoarea=" + codigoarea + "]";
    }

}
